package com.uwlaser.service.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 产品出站返回对象- 多个
 */
@Data
public class OutboundBatchResult {

    @ApiModelProperty("产品序号列表")
    private List<ProductSn> productSns;

    public void addProductSn(String productSn,String message,Integer status){
        if(this.productSns == null){
            this.productSns = new ArrayList<>();
        }
        this.productSns.add(new ProductSn(productSn,message,status));
    }

    @Data
    public class ProductSn {

        @ApiModelProperty("产品序号")
        private String productSn;

        @ApiModelProperty("状态")
        private  Integer status;

        @ApiModelProperty("消息")
        private  String message;

        public ProductSn(String productSn, String message, Integer status) {
            this.productSn = productSn;
            this.status = status;
            this.message = message;
        }
    }

}
